package com.teacher.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.teacher.common.CommonResult;
import com.teacher.pojo.vo.permission.PermissionAddVo;
import com.teacher.pojo.vo.permission.PermissionUpdateVo;
import com.teacher.security.entity.permission.Permission;

/**
 * <p>
 * 服务类
 * </p>
 *
 * @author zfm
 * @since 2020-06-02
 */
public interface IPermissionService extends IService<Permission> {

    /**
     * @param permissionAddVo object of permission's value
     * @return add permission whether success
     */
    CommonResult addPermission(PermissionAddVo permissionAddVo);

    /**
     * @param permissionUpdateVo object of permission's value
     * @return update permission where success
     */
    CommonResult updatePermission(PermissionUpdateVo permissionUpdateVo);

    /**
     * query all permission by tree's shape
     *
     * @return
     */
    CommonResult treePermission();

    /**
     * get permission by role's id
     *
     * @param id
     * @return
     */
    CommonResult getPermissionByRoleId(Long id);

    /**
     * get menu of root
     *
     * @return
     */
    CommonResult getRootMenu();

}
